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equipments/[slug].tsx","webpack://_N_E/"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/equipments/[slug]\",\n function () {\n return require(\"private-next-pages/equipments/[slug].tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/equipments/[slug]\"])\n });\n }\n ","import { NextPageContext } from \"next\";\nimport Head from \"next/head\";\nimport useSWR from \"swr\";\n\nimport { NotFound } from \"@/components/common/notfound\";\nimport { fetchEquipmentDetail } from \"@/components/equipments/api\";\nimport { EquipmentDetail } from \"@/components/equipments/v2/equipment-detail\";\nimport { Loading } from \"@/components/loading\";\nimport MainLayout from \"@/components/main-layout\";\nimport { superFetchData } from \"@/lib/utils\";\n\nexport async function getServerSideProps(context: NextPageContext) {\n const { slug } = context.query;\n\n const { data } = (await fetchEquipmentDetail(slug as string)) as any;\n\n return {\n props: data || { slug },\n };\n}\n\ninterface Props {\n equipment: any;\n slug?: string;\n}\n\nexport default function EquipmentDetailPage(props: Props) {\n const { data, mutate, isLoading } = useSWR(\n `/equipments/${props.equipment?.slug || props.slug}`,\n superFetchData,\n { fallbackData: props },\n );\n\n const title = `Reserve ${data?.equipment?.name} | Second Lab`;\n\n if (!data?.equipment && isLoading) return ;\n if (!data?.equipment) return ;\n\n const image = data.equipment.photos?.[0] || \"\";\n\n const equipment = data.equipment;\n const description = `Easily get on-demand access to the ${data?.equipment?.name}. Reserve your equipment today.`;\n\n const jsonLd = {\n \"@context\": \"https://schema.org\",\n \"@type\": \"Service\",\n provider: {\n \"@type\": \"Organization\",\n name: \"Second Lab\",\n url: \"https://www.secondlab.com\",\n },\n name: equipment.name,\n description,\n offers: {\n \"@type\": \"Offer\",\n price: equipment.price,\n priceCurrency: \"USD\",\n availability: \"https://schema.org/InStock\",\n itemCondition: \"https://schema.org/NewCondition\",\n },\n serviceType: \"Laboratory Services\",\n location: {\n \"@type\": \"Place\",\n address: {\n \"@type\": \"PostalAddress\",\n streetAddress: equipment.org?.address_1,\n addressLocality: equipment.org?.city,\n addressRegion: equipment.org?.state,\n postalCode: equipment.org?.zip,\n addressCountry: \"US\",\n },\n },\n potentialAction: {\n \"@type\": \"OrderAction\",\n target: {\n \"@type\": \"EntryPoint\",\n urlTemplate: `${process.env.NEXT_PUBLIC_SITE_URL}/equipments/${equipment.slug}`,\n actionPlatform: [\n \"http://schema.org/DesktopWebPlatform\",\n \"http://schema.org/IOSPlatform\",\n \"http://schema.org/AndroidPlatform\",\n ],\n },\n expectsAcceptanceOf: {\n \"@type\": \"Offer\",\n itemOffered: {\n \"@type\": \"Service\",\n name: equipment.name,\n },\n },\n },\n };\n\n return (\n <>\n \n {title}\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nEquipmentDetailPage.getLayout = function getLayout(page: any) {\n return {page};\n};\n"],"names":["window","__NEXT_P","push","__webpack_require__","EquipmentDetailPage","props","data","equipment","mutate","isLoading","useSWR","concat","slug","superFetchData","fallbackData","title","name","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","Loading","NotFound","image","photos","description","jsonLd","provider","url","offers","price","priceCurrency","availability","itemCondition","serviceType","location","address","streetAddress","org","address_1","addressLocality","city","addressRegion","state","postalCode","zip","addressCountry","potentialAction","target","urlTemplate","process","actionPlatform","expectsAcceptanceOf","itemOffered","jsxs","Fragment","Head","meta","content","property","link","rel","href","EquipmentDetail","script","type","dangerouslySetInnerHTML","__html","JSON","stringify","getLayout","page","MainLayout","isPublic"],"sourceRoot":""}